Dynamic programming (e.g., scripting) languages are commonly used by programmers to produce code. JavaScript (also referred to as ECMAScript or JScript) is a well-known example of one such programming language widely used on the web, and is valued for its flexibility and simplicity. Much of that flexibility is derived from the fact that JavaScript is dynamically-typed, which means that programmers do not have to declare the types of their variables in their programming. Instead, the JavaScript engine attempts to treat whatever variable the programmer is using as the data type that makes the most sense in the context in which it is being used.
However, despite this flexibility, there are drawbacks to such a dynamically-typed language. For one, some data values are ambiguous; dynamic typing makes it more difficult for programmers and runtimes to differentiate between such ambiguous values, and to do parameter validation and matching. By way of example, the value ‘98052’ may correspond to an integer or a string, as well as possibly corresponding to a higher-level concept like a zip code. In such an example, dynamic typing has no way to determine the value's intended type.